package com.wc.AlgoOJ.MA0006_因数个数2;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/27 15:11
 * @description http://43.138.190.70:8888/p/MA0006
 */
public class Main {
    static int P = 10007;
    static int N = (int) 1e7 + 5000;
    static int[] primes = new int[N / 10];
    static int idx = 0;
    static boolean[] isNotPrime = new boolean[N];
    static Map<Long, Integer> map = new HashMap<>();
    static int n;
    static long x;
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        ola();
        n = sc.nextInt();
        while (n-- > 0) {
            x = sc.nextLong();
            yinshu(x);
        }
        long res = 1;
        for (Map.Entry<Long, Integer> entry : map.entrySet()) {
            res = res * (entry.getValue() + 1) % P;
        }
        out.println(res);
        out.flush();
    }

    static void yinshu(long x) {
        for (int j = 1; primes[j] <= x / primes[j]; j++) {
            if (x % primes[j] == 0) {
                int t = 0;
                while (x % primes[j] == 0) {
                    t++;
                    x /= primes[j];
                }
                map.put((long) primes[j], map.getOrDefault((long) primes[j], 0) + t);
            }
        }
        if (x > 1) {
            map.put(x, map.getOrDefault(x, 0) + 1);
        }
    }

    static void ola() {
        isNotPrime[0] = isNotPrime[1] = true;
        for (int i = 2; i < N; i++) {
            if (!isNotPrime[i]) primes[++idx] = i;
            for (int j = 1; i * primes[j] < N; j++) {
                isNotPrime[i * primes[j]] = true;
                if (i % primes[j] == 0) break;
            }
        }
    }

}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}